#ifndef __GAMEHACK_GAMEHACK_H__
#define __GAMEHACK_GAMEHACK_H__
#include <luabind/luabind.hpp>
#include <luabind/lua_include.hpp>

#include <singleton.hpp>

class GameHack :public core::Singleton<GameHack>
{
	friend core::Singleton<GameHack>;
private:
	GameHack()
		: self_hadle_(NULL), is_initialized_(false)
	{}
	~GameHack()
	{}
public:
	bool Initialize(HINSTANCE dll_hanlde);
	void Finalize();
private:
	void ProcessCmd(std::string& cmd);
	void RegisterToScript();
	void ExecuteLuaScript(const char* file_name);
	void WorkThread();
private:
	HINSTANCE self_hadle_;
	bool is_initialized_;
	lua_State* lua_state_;
};
#define sGameHack GameHack::GetInstance()
#endif//__GAMEHACK_GAMEHACK_H__